import http from "@/utills/request"
//获取充值的产品
export  let getCategoryApi = ()=>http.get('/product/get_product',{
    params:{
        category_id:'20210827165510715'
    }
})

//下单
export let  preOrderApi = (product_id,quantity)=>http.post('/order/pre_order',{
    product_id,
    quantity
})

//发起支付
export let  paymentApi = (order_id)=>http.post('/pay/payment',{
    order_id
})

//查询支付结果
export let  orderApi = (order_id)=>http.get('/order/query_order_status',{
    params:{
        order_id
    }
})

//查询订单详情
export let  getOrderApi = (order_id)=>http.post('/order/get_order',{
        order_id
    
})


export let getProduct = (product_id)=>http.get('/product/get_product',{
    params:{product_id}
})
//下单
export let preOrder = (product_id,quantity)=>http.post('/order/pre_order',{
    product_id,
    quantity
})

//查询订单支付状态
export let orderStatus = (order_id)=>http.get('/order/query_order_status',{
    params:{order_id}
})

